<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>个人中心</title>
    <link rel="stylesheet" href="styles.css">
    <style>
        .header {
            background: linear-gradient(135deg, #87CEFA);
            padding: 20px;
            color: white;
        }
        
        .user-info {
            display: flex;
            align-items: center;
            padding: 20px 0;
        }
        
        .avatar {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            border: 3px solid rgba(255, 255, 255, 0.3);
            overflow: hidden;
        }
        
        .user-details {
            margin-left: 20px;
        }
        
        .stats-bar {
            display: flex;
            justify-content: space-around;
            background: white;
            padding: 15px;
            border-radius: 15px;
            margin: 20px 15px;
        }
        
        .menu-list {
            margin: 20px 15px;
            background: white;
            border-radius: 15px;
            overflow: hidden;
        }
        
        .menu-item {
            display: flex;
            align-items: center;
            padding: 15px;
            border-bottom: 1px solid #f0f0f0;
        }
    </style>
</head>
<body>
    <div class="header">
        <div class="user-info">
            <div class="avatar" onclick="changeAvatar()">
                <img src="image/28.jpg" alt="用户头像" id="userAvatar">
            </div>
            <div class="user-details">
                <div id="username">用户名</div>
                <div id="userStats">会员等级: 普通会员</div>
            </div>
        </div>
    </div>

    <div class="stats-bar">
        <div class="stat-item">
            <div class="stat-value">12</div>
            <div class="stat-label">追番</div>
        </div>
        <div class="stat-item">
            <div class="stat-value">24</div>
            <div class="stat-label">收藏</div>
        </div>
        <div class="stat-item">
            <div class="stat-value">36</div>
            <div class="stat-label">积分</div>
        </div>
    </div>

    <div class="menu-list">
        <div class="menu-item">
            <div class="menu-icon">📺</div>
            <div class="menu-text">观看历史</div>
        </div>
        <div class="menu-item">
            <div class="menu-icon">❤️</div>
            <div class="menu-text">我的收藏</div>
        </div>
        <div class="menu-item">
            <div class="menu-icon">⚙️</div>
            <div class="menu-text">账号设置</div>
        </div>
    </div>

    <script>
        window.onload = function() {
            const user = localStorage.getItem('loggedInUser') || '游客';
            document.getElementById('username').textContent = user;
        }
        
        function changeAvatar() {
            window.location.href = 'camera.html';
        }
    </script>
</body>
</html>